<template>
	<view class="p20">
		<u-empty v-if="!list.length" />
		<view class="box-shadow p20 bg-fff  mb20 radius20" v-for="(item,index) in list" :key="index"
			@click="jump(item)">
			<view class="flex ">
				<image :src="item.avatar||''" class="h180 w180 radius" mode="aspectFill"></image>
				<view class="flex1 pl24">
					<view class="fs28 fw-700">{{item.name}}</view>
					<scroll-view scroll-x class="flex fs22  nowrap" >
						<view v-for="(item,index) in item.types" :key="index" class="px20 py6 radius8 mr20 dib mt12"
							:class="index==0?'cyan':index==1?'yellow':'blue'">{{item}}</view>
					</scroll-view>
					<view class="text-cut-1 color-666 fs24 mt16">
						<text class="color-232323">陪诊医院：</text>
						<text class="color-666">{{item.hospital}}</text>
					</view>
					<view class="text-cut-1 color-666 fs24 mt16">
						<text class="color-232323">陪诊项目：</text>
						<text class="color-666">{{item.service}}</text>
					</view>
				</view>
			</view>
			<view class="flex mt26 fs24 color-999">
				<view class="">陪诊次数：</view>
				<view class="color-zs">{{item.num}}</view>
				<view class="flex1">次</view>
				<view class="">陪诊价格：</view>
				<view class="color-zs">{{item.price}}</view>
				<view class="">元起</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "orgList",
		props: {
			list: {
				default: ''
			},
			tch: {
				default: false
			},
		},
		data() {
			return {

			};
		},
		methods: {
			jump(item) {
				let api = '/pages/index/mechanismDetails/mechanismDetails'
				let params = {
					organ_id: item.organ_id || item.id
				}
				if (this.tch) {
					api = '/pages/index/attendantDeatils/attendantDeatils'
					params = {
						master_id: item.master_id || item.id
					}
				}
				this.$u.route(api, params)
			}
		}
	}
</script>

<style lang="scss">

</style>
